package com.kaifamiao.www.ioDemo.do0924;

import java.lang.reflect.Field;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * @author Administrator
 */
public class HWork {

    public static void main(String[] args) {

    }

    public static Collections getFileds(Class cla){
        if (cla != null){
            Set<Field> fields = new HashSet<>();
            //类中所有显示声明的属性
            Field[] declaredFields = cla.getDeclaredFields();
            //获取所有的public声明
            Field[] fs = cla.getFields();
            fields.addAll(List.of(declaredFields));
            fields.addAll(List.of(fs));
            //获取父类



        }
        return null;
    }
}
